How do OSes work on multiple CPUs? [on hold]

Posted by user3691093 on Programmers See other posts from Programmers or by user3691093
Published on 2014-05-30T12:19:58Z Indexed on 2014/05/31 16:00 UTC
Read the original article Hit count: 116

Filed under:

Assumption: "OS es (atleast in some part) should be written in assembly.Assembly programs are CPU specefic." If so how can one os run on different CPUs ? For example: how is that I can load Ubuntu on different systems having different CPUs (like intel i3,i5,i7, amd a8,a6,etc) from the same bootable disk?

  1. Does the disk contain seporate assembly programs for each CPU?
  2. Are these CPUs 'similar' enough to run the same assembly program?
  3. Is my assumption wrong?
  4. Something else....

Thanks for responding.

  1. I tried to find out in what way are the CPUs that I mentioned 'similar'. I came across the concepts of Instruction Set Architecture and Microarchitecture of CPUs.A CPU will understand a program if it is combatible with its ISA. Even if CPUs are 'wired up' differently (different microarchitecture) , as long as the ISA implemented on top is same ,the program will work. ARM and x86 have different ISA ( that why there are 2 windows 8 versions, right?). And if an app program is written in an HLL with compilers for both platforms we will saved from wasting time writing 2 programs. Did I understand anything wrong?
  2. Are there programs that can take a compiled program as input and produce a program executable on another CPU as output? Is it possible? (Virtualisation?)
  3. 32 bit windows programs do install on 64 bit windows ,dont they? Arent 64 bit CPUs 'differerent' from 32 bit CPUs? They do get seporate OS versions, right?
  4. Is this backward combatibility achieved using programes mentioned in (3) ?

© Programmers or respective owner

Related posts about architecture